package net.lzzy.controller;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ModelAttribute;

/**
 * @author huc29
 */
@ControllerAdvice
public class GlobalController {
//全局控制器，添加全局数据

    @ModelAttribute
    public void addGlobalData(Model model){
        model.addAttribute("contact","lzzy@163.com");
        model.addAttribute("homeUrl","https://www.lzzy.net");
    }
}
